
var graphData = [
    [
        1485878400000,
        260
    ],
    [
        1486137600000,
        200
    ],
    [
        1486569600000,
        279
    ],
    [
        1486915200000,
        680
    ],
    [
        1487347200000,
        241
    ],
    [
        1487779200000 + 3600 * 24 * 1000 * 15,
        411
    ],
    [
        1488124800000 + 3600 * 24 * 1000 * 23,
        730
    ]
];

var links = graphData.map(function (item, idx) {
    return {
        source: idx,
        target: idx + 1
    };
});
links.pop();

let dataString = '2017-01-01|610,2017-01-02|137,2017-01-03|741,2017-01-04|77,2017-01-05|872,2017-01-06|74,2017-01-07|31,2017-01-08|604,2017-01-09|311,2017-01-10|575,2017-01-11|192,2017-01-12|730,2017-01-13|44,2017-01-14|555,2017-01-15|550,2017-01-16|464,2017-01-17|70,2017-01-18|879,2017-01-19|578,2017-01-20|979,2017-01-21|199,2017-01-22|186,2017-01-23|372,2017-01-24|83,2017-01-25|135,2017-01-26|274,2017-01-27|81,2017-01-28|403,2017-01-29|584,2017-01-30|989,2017-01-31|592,2017-02-01|765,2017-02-02|615,2017-02-03|399,2017-02-04|456,2017-02-05|808,2017-02-06|6,2017-02-07|157,2017-02-08|758,2017-02-09|593,2017-02-10|674,2017-02-11|902,2017-02-12|578,2017-02-13|487,2017-02-14|152,2017-02-15|273,2017-02-16|821,2017-02-17|284,2017-02-18|384,2017-02-19|629,2017-02-20|194,2017-02-21|150,2017-02-22|383,2017-02-23|274,2017-02-24|27,2017-02-25|868,2017-02-26|668,2017-02-27|858,2017-02-28|282,2017-03-01|862,2017-03-02|812,2017-03-03|56,2017-03-04|648,2017-03-05|48,2017-03-06|701,2017-03-07|23,2017-03-08|720,2017-03-09|831,2017-03-10|716,2017-03-11|506,2017-03-12|313,2017-03-13|413,2017-03-14|196,2017-03-15|371,2017-03-16|83,2017-03-17|94,2017-03-18|505,2017-03-19|814,2017-03-20|857,2017-03-21|720,2017-03-22|168,2017-03-23|600,2017-03-24|332,2017-03-25|772,2017-03-26|679,2017-03-27|903,2017-03-28|689,2017-03-29|143,2017-03-30|889,2017-03-31|653,2017-04-01|295,2017-04-02|553,2017-04-03|999,2017-04-04|86,2017-04-05|295,2017-04-06|719,2017-04-07|814,2017-04-08|245,2017-04-09|440,2017-04-10|509,2017-04-11|854,2017-04-12|234,2017-04-13|120,2017-04-14|643,2017-04-15|69,2017-04-16|828,2017-04-17|677,2017-04-18|783,2017-04-19|376,2017-04-20|98,2017-04-21|658,2017-04-22|218,2017-04-23|414,2017-04-24|193,2017-04-25|277,2017-04-26|966,2017-04-27|75,2017-04-28|989,2017-04-29|868,2017-04-30|478,2017-05-01|831,2017-05-02|765,2017-05-03|857,2017-05-04|216,2017-05-05|374,2017-05-06|781,2017-05-07|122,2017-05-08|949,2017-05-09|740,2017-05-10|118,2017-05-11|656,2017-05-12|577,2017-05-13|700,2017-05-14|859,2017-05-15|358,2017-05-16|562,2017-05-17|392,2017-05-18|535,2017-05-19|458,2017-05-20|513,2017-05-21|762,2017-05-22|353,2017-05-23|680,2017-05-24|645,2017-05-25|514,2017-05-26|164,2017-05-27|407,2017-05-28|250,2017-05-29|746,2017-05-30|390,2017-05-31|454,2017-06-01|612,2017-06-02|487,2017-06-03|292,2017-06-04|733,2017-06-05|432,2017-06-06|15,2017-06-07|955,2017-06-08|232,2017-06-09|257,2017-06-10|889,2017-06-11|625,2017-06-12|52,2017-06-13|75,2017-06-14|345,2017-06-15|644,2017-06-16|241,2017-06-17|68,2017-06-18|4,2017-06-19|502,2017-06-20|626,2017-06-21|924,2017-06-22|476,2017-06-23|190,2017-06-24|420,2017-06-25|713,2017-06-26|430,2017-06-27|373,2017-06-28|956,2017-06-29|876,2017-06-30|495,2017-07-01|158,2017-07-02|305,2017-07-03|701,2017-07-04|900,2017-07-05|522,2017-07-06|901,2017-07-07|507,2017-07-08|359,2017-07-09|815,2017-07-10|420,2017-07-11|641,2017-07-12|3,2017-07-13|885,2017-07-14|773,2017-07-15|781,2017-07-16|703,2017-07-17|589,2017-07-18|199,2017-07-19|717,2017-07-20|553,2017-07-21|477,2017-07-22|84,2017-07-23|381,2017-07-24|2,2017-07-25|320,2017-07-26|565,2017-07-27|431,2017-07-28|248,2017-07-29|244,2017-07-30|252,2017-07-31|476,2017-08-01|611,2017-08-02|218,2017-08-03|764,2017-08-04|1,2017-08-05|146,2017-08-06|610,2017-08-07|73,2017-08-08|289,2017-08-09|4,2017-08-10|145,2017-08-11|487,2017-08-12|733,2017-08-13|488,2017-08-14|931,2017-08-15|468,2017-08-16|93,2017-08-17|48,2017-08-18|352,2017-08-19|17,2017-08-20|421,2017-08-21|896,2017-08-22|968,2017-08-23|634,2017-08-24|785,2017-08-25|204,2017-08-26|474,2017-08-27|604,2017-08-28|632,2017-08-29|42,2017-08-30|583,2017-08-31|450,2017-09-01|11,2017-09-02|608,2017-09-03|101,2017-09-04|106,2017-09-05|48,2017-09-06|988,2017-09-07|848,2017-09-08|329,2017-09-09|994,2017-09-10|17,2017-09-11|570,2017-09-12|125,2017-09-13|178,2017-09-14|42,2017-09-15|403,2017-09-16|5,2017-09-17|361,2017-09-18|713,2017-09-19|413,2017-09-20|716,2017-09-21|424,2017-09-22|52,2017-09-23|930,2017-09-24|29,2017-09-25|225,2017-09-26|76,2017-09-27|688,2017-09-28|466,2017-09-29|994,2017-09-30|256,2017-10-01|681,2017-10-02|948,2017-10-03|447,2017-10-04|133,2017-10-05|55,2017-10-06|226,2017-10-07|910,2017-10-08|977,2017-10-09|247,2017-10-10|841,2017-10-11|516,2017-10-12|457,2017-10-13|327,2017-10-14|230,2017-10-15|772,2017-10-16|887,2017-10-17|229,2017-10-18|148,2017-10-19|638,2017-10-20|800,2017-10-21|486,2017-10-22|708,2017-10-23|915,2017-10-24|934,2017-10-25|287,2017-10-26|631,2017-10-27|304,2017-10-28|972,2017-10-29|960,2017-10-30|656,2017-10-31|335,2017-11-01|530,2017-11-02|98,2017-11-03|343,2017-11-04|130,2017-11-05|570,2017-11-06|364,2017-11-07|415,2017-11-08|464,2017-11-09|582,2017-11-10|522,2017-11-11|983,2017-11-12|535,2017-11-13|399,2017-11-14|529,2017-11-15|928,2017-11-16|160,2017-11-17|486,2017-11-18|676,2017-11-19|916,2017-11-20|15,2017-11-21|397,2017-11-22|159,2017-11-23|418,2017-11-24|60,2017-11-25|310,2017-11-26|871,2017-11-27|223,2017-11-28|394,2017-11-29|274,2017-11-30|417,2017-12-01|551,2017-12-02|602,2017-12-03|21,2017-12-04|974,2017-12-05|617,2017-12-06|701,2017-12-07|758,2017-12-08|950,2017-12-09|614,2017-12-10|628,2017-12-11|94,2017-12-12|365,2017-12-13|904,2017-12-14|175,2017-12-15|243,2017-12-16|316,2017-12-17|408,2017-12-18|695,2017-12-19|382,2017-12-20|301,2017-12-21|654,2017-12-22|417,2017-12-23|998,2017-12-24|258,2017-12-25|681,2017-12-26|94,2017-12-27|208,2017-12-28|852,2017-12-29|112,2017-12-30|567,2017-12-31|295'

let data = dataString.split(',').reduce((array, dataItem) => {
    let split = dataItem.split('|')
    array.push([split[0], split[1]])
    return array
}, [])

export default [
    {
        id: 'calendar-chart-demo-1',
        title: 'Calendar Lunar',
        option: {
            tooltip: {},
            calendar: {
                top: 'middle',
                left: 'center',
                orient: 'vertical',
                cellSize: 40,
                yearLabel: {
                    margin: 50,
                    textStyle: {
                        fontSize: 30
                    }
                },
                dayLabel: {
                    firstDay: 1,
                    nameMap: 'cn'
                },
                monthLabel: {
                    nameMap: 'cn',
                    margin: 15,
                    textStyle: {
                        fontSize: 20,
                        color: '#999'
                    }
                },
                range: ['2017-02', '2017-03-31']
            },
            visualMap: {
                min: 0,
                max: 800,
                type: 'piecewise',
                left: 20,
                bottom: 20,
                inRange: {
                    color: ['#5291FF', '#C7DBFF']
                },
                seriesIndex: [1],
                orient: 'horizontal'
            },
            series: [{
                type: 'graph',
                edgeSymbol: ['none', 'arrow'],
                coordinateSystem: 'calendar',
                links: links,
                symbolSize: 15,
                calendarIndex: 0,
                itemStyle: {
                    normal: {
                        color: 'yellow',
                        shadowBlue: 9,
                        shadowOffsetX: 1.5,
                        shadowOffsetY: 3,
                        shadowColor: '#555'
                    }
                },
                lineStyle: {
                    normal: {
                        color: '#D10E00',
                        width: 1,
                        opacity: 1
                    }
                },
                data: graphData,
                z: 20
            }, {
                type: 'heatmap',
                coordinateSystem: 'calendar',
                data: data
            }]
        }
    }
]
